import request from "@/utils/request";

export function listData(query) {
  return request({
    url: `war/order/season${query}`,
    method: "get"
  });
}

export function giftListData() {
  return request({
    url: `/reward/item/list?page=1&perPage=10000`,
    method: "get"
  });
}

export function listDetailData(id) {
  return request({
    url: `war/order/season/detail?id=${id}`,
    method: "get"
  });
}
export function listRewardData(query) {
  return request({
    url: `war/order/season/reward${query}`,
    method: "get"
  });
}

export function postData(form) {
  return request({
    url: `war/order/season`,
    method: "post",
    data: form
  });
}
export function postOrderData(form) {
  return request({
    url: `war/order`,
    method: "post",
    data: form
  });
}
export function postRewardData(form) {
  return request({
    url: `war/order/season/recommend`,
    method: "post",
    data: form
  });
}

export function deleteData(form) {
  return request({
    url: `war/order/season`,
    method: "delete",
    data: form
  });
}

export function deleteOrderData(form) {
  return request({
    url: `war/order`,
    method: "delete",
    data: form
  });
}

export function postImport(war_order_id) {
  return request({
    url: `war/order/import`,
    method: "post",
    data: { war_order_id }
  });
}
